let merge = require('webpack-merge').merge;
const common = require('./webpack.common');
const webpack = require("webpack");
let env = require("./dev.env");

// 起本地服务，我起的static目录
module.exports = merge(common, {
  	mode: 'development',
  	devtool: '#cheap-module-eval-source-map',
  	devServer: {
	    contentBase: ['./'],
        hot: true
        // proxy: {
        //     '/apis': {
        //         target: 'http://10.0.1.105:9000',
        //          // target: 'http://112.53.68.114:9500',
        //         changeOrigin: true,
        //         pathRewrite: {
        //             '^/apis': ''
        //         }
        //     }
        // },
        // historyApiFallback: true,
        // inline: true,
        // hot: true,
        // port:8888,
        // host: '0.0.0.0'//我的局域网ip
  	},
    plugins: [
        new webpack.DefinePlugin({
            'process.env': env
        })
    ]
})